home *** CD-ROM | disk | FTP | other *** search
- ╔═══════════════════╗
- ║ ║
- ║ WHAT IS GETKEY? ║
- ║ ║
- ╚═══════════════════╝
-
-
- The GETKEY utility is used in a batch file to present a single-line
- multiple choice question. When you don't need something as fancy as
- our GO-MENU program, GETKEY is quick and easy!
-
-
-
- ╔═════════════════════╗
- ║ ║
- ║ HOW TO USE GETKEY ║
- ║ ║
- ╚═════════════════════╝
-
-
- ╒═══════════════╕
- │ QUICK-START │
- ╘═══════════════╛
-
-
- If you are already familiar with:
-
- ■ Text editors
- ■ Batch files
- ■ The IF ERRORLEVEL batch statement
-
- you can learn most of what you need to know by entering the following
- command at the DOS prompt:
-
- GETKEY /?
-
- A more detailed explanation of GETKEY follows.
-
-
-
- ╒══════════════════╕
- │ STANDARD USAGE │
- ╘══════════════════╛
-
-
- NOTE: For information about creating batch files, refer to the documentation
- for the GO-MENU utility.
-
-
- The basic DOS command line format for GETKEY is:
-
- GETKEY <prompt text> <keys>
-
- For example, at the DOS prompt, you could enter the command as:
-
- GETKEY Do you want to continue? YN
-
- This will display the text (all except the final YN part). As for the
- letters YN, the first character is surrounded by brackets to show that it is
- the default selection (what the user will get if he presses spacebar or
- Enter).
-
- Normally, the first character in the list of letters is the default. You
- can change this by putting the "@" character in front of the one you want to
- be the default. For example:
-
- GETKEY Do you want to format all your hard disks? Y@N
-
- In this case, the N would be surrounded by square brackets, indicating that
- it is the default (what the user gets if he presses spacebar or Enter).
-
- Of course, GETKEY isn't much use unless it is used in a batch file. It sets
- the DOS ERRORLEVEL according to the letter selected, so you can control the
- batch file. For example, in this example:
-
- GETKEY Pick your favourite vowel AEIOUY
-
- The ERRORLEVEL would be set to 1 if the user selected "A", 2 if the user
- selected "E", and so on.
-
-
- ╒═══════════╕
- │ PAUSING │
- ╘═══════════╛
-
-
- GETKEY can also be used to display a message where ANY key will continue.
- This is a nice alternative to the usual (and unattractive) "PAUSE" command
- used in batch files. To use GETKEY for pausing, place the "@" character at
- the end of the text, without any other characters. Thus:
-
- GETKEY Press any key to continue... @
-
-
-
- ╔═══════════════════════╗
- ║ ║
- ║ MISCELLANEOUS NOTES ║
- ║ ║
- ╚═══════════════════════╝
-
-
- For a quick summary of the material covered above, try starting GETKEY by
- typing the following command at the DOS prompt:
-
- GETKEY /?
-
- To try a sample batch file that makes use of GETKEY, enter the following
- command at the DOS prompt:
-
- TRYGET
-
- To view the batch file, enter this command:
-
- SEE TRYGET.BAT
-
-